import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '公司编号',
    align:"center",
    dataIndex: 'companyNumber'
   },
   {
    title: '设备名称',
    align:"center",
    dataIndex: 'equipmentName'
   },
   {
    title: '保养内容',
    align:"center",
    dataIndex: 'maintainContent'
   },
   {
    title: '保养周期',
    align:"center",
    dataIndex: 'contentTime'
   },
   {
    title: '保养人员',
    align:"center",
    dataIndex: 'maintainPersonnel'
   },
   {
    title: '审核人员',
    align:"center",
    dataIndex: 'auditPersonnel'
   },
  {
    title: '审核内容',
    align:"center",
    dataIndex: 'auditContent'
  },
   {
    title: '保养状态',
    align:"center",
    dataIndex: 'personnelStatus'
   },
   {
    title: '保养时间',
    align:"center",
    dataIndex: 'personnelDate'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "公司编号",
      field: 'companyNumber',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "设备名称",
      field: 'equipmentName',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '公司编号',
    field: 'companyNumber',
    component: 'Input',
  },
  {
    label: '设备名称',
    field: 'equipmentName',
    component: 'Input',
  },
  {
    label: '保养内容',
    field: 'maintainContent',
    component: 'Input',
  },
  {
    label: '保养周期',
    field: 'contentTime',
    component: 'Input',
  },
  {
    label: '保养人员',
    field: 'maintainPersonnel',
    component: 'Input',
  },
  {
    label: '审核人员',
    field: 'auditPersonnel',
    component: 'Input',
  },
  {
    label: '保养状态',
    field: 'personnelStatus',
    component: 'Input',
  },
  {
    label: '审核内容',
    field: 'auditContent',
    component: 'InputTextArea',
  },
  {
    label: '保养时间',
    field: 'personnelDate',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  companyNumber: {title: '公司编号',order: 0,view: 'text', type: 'string',},
  equipmentName: {title: '设备名称',order: 1,view: 'text', type: 'string',},
  maintainContent: {title: '保养内容',order: 2,view: 'text', type: 'string',},
  contentTime: {title: '保养周期',order: 3,view: 'text', type: 'string',},
  maintainPersonnel: {title: '保养人员',order: 4,view: 'text', type: 'string',},
  auditPersonnel: {title: '审核人员',order: 5,view: 'text', type: 'string',},
  personnelStatus: {title: '保养状态',order: 6,view: 'text', type: 'string',},
  personnelDate: {title: '保养时间',order: 7,view: 'text', type: 'string',},
  auditContent: {title: '审核内容',order: 8,view: 'text', type: 'string',},

};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
